package rgbos.forum.search;

import rgbos.forum.domain.Post;

public class PostRate implements Comparable<PostRate>{

	private Post post_;
	private float score_;

	public PostRate(Post post, float score) {
		post_ = post;
		score_ = score;
	}

	public Post getPost() {
		return post_;
	}

	public float getScore() {
		return score_;
	}

	@Override
	public int compareTo(PostRate oPost) {
		if (this.score_ > oPost.score_)
			return -1;
		else if (this.score_ < oPost.score_)
			return 1;
		else
			return 0;
	}

}
